{if $tourney eq 0}
<p>No se ha creado un torneo a&uacute;n, por lo tanto no se pueden ingresar records</p>
{else}
<form id="new">
    <table>
        <tbody>
        <tr height="13">
            <td width="22%">Tipo:</td>
            <td>
                <select id="rec_type" name="rec_type" onfocus="switchColor('rec_type',&#034;#999999&#034;);">
                    <option value="">--selecciona--</option>
                    <option value="1">Partido</option>
                    <option value="2">Torneo</option>
                </selet>
            </td>
        </tr>
        <tr height="13">
            <td width="22%">Ambito:</td>
            <td>
                <select id="rec_ambit" name="rec_ambit" onfocus="switchColor('rec_ambit',&#034;#999999&#034;);">
                    <option value="">--selecciona--</option>
                    <option value="1">Regional</option>
                    <option value="2">Nacional</option>
                    <option value="3">Internacional</option>
                </selet>
            </td>
        </tr>
        <tr height="13">
            <td>Valor:</td>
            <td>
                <input id="rec_value" name="rec_value" type="text" size="3" maxlength="3" onkeypress="return onlyNumbers(event);" onfocus="switchColor('rec_value',&#034;#999999&#034;);" />
            </td>
        </tr>
        <tr height="13">
            <td>Fecha:</td>
            <td>
                <input id="rec_date" name="rec_date" type="text" size="10" readonly="readonly" />
                <img src="images/calendar_view_week.png" onclick="switchColor('rec_date',&#034;#999999&#034;);displayCalendar($('rec_date'),'yyyy.mm.dd',this)" />
            </td>
        </tr>
        <tr height="13">
            <td>Descripci&oacute;n:</td>
            <td>
                <textarea id="rec_description" name="rec_description" cols="25" rows="5" onfocus="switchColor('rec_description',&#034;#999999&#034;);"></textarea>
            </td>
        </tr>
        <tr height="13">
            <td width="22%">Jugador:</td>
            <td>
                <select id="rec_pla_id" name="rec_pla_id" onchange="putGender();" onfocus="switchColor('rec_pla_id',&#034;#999999&#034;);">
                    <script type="text/javascript">
                        function putGender(){ldelim}
                            var values = $('rec_pla_id').value.split('_');
                            $('rec_gender').value = values[1];
                            $('rec_status').value = values[0];
                        {rdelim}
                    </script>
                    <option value="">--Selecciona--</option>
                    {foreach item=player from=$allplayers}
                    <option value="{$player.pla_id}_{$player.pla_gender}">{$player.name}</option>
                    {/foreach}
                </select>
                <input type="hidden" id="rec_gender" name="rec_gender" value="" />
            </td>
        </tr>
        <tr>
            <td />
            <td>
                <input class="button" type="button" value="Crear" onclick="send('new','content_area','Record/WP_Record.php?action=4');" />
                <input class="button" type="reset" value="Limpiar" />
            </td>
        </tr>
        </tbody>
    </table>
</form>
{/if}